import { defHttp } from "@/utils/http";
import { baseUrlApi } from './utils'

export type DetailResult = {
  code: number;
  data: any;
  msg: string;
};

/** 调拨单列表 */
export const getWarehouseAllocationPageList = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseAllocation/pagelist"),
    data
  });
};
/** 调拨单详情 */
export const getWarehouseAllocationDetail = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseAllocation/detail"),
    data
  });
};
/** 调拨单详情编辑 */
export const getWarehouseAllocationDetailForUpdate = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseAllocation/detailForUpdate"),
    data
  });
};
/** 调拨单确认入库 */
export const setWarehouseAllocationConfirmInbound = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseAllocation/confirmInbound"),
    data
  });
};
/** 调拨单新增 */
export const setWarehouseAllocationAdd = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseAllocation/add"),
    data
  });
};